//
//  CityHotCell.m
//  ZhuanZuBao
//
//  Created by 戴伟 on 2020/9/10.
//  Copyright © 2020 戴伟. All rights reserved.
//

#import "CityHotCell.h"

@implementation CityHotCell

- (void)awakeFromNib {
    [super awakeFromNib];
}

+ (instancetype)cellWithTableView:(UITableView *)tableView{
    static NSString *ID = @"CityHotCell";
    CityHotCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:ID owner:self options:nil] lastObject];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return cell;
}

- (IBAction)btnClicked:(UIButton *)sender {
    NSString *str = @"";
    switch (sender.tag) {
        case 0:
            str = @"合肥";
            break;
        case 1:
            str = @"石家庄";
            break;
        case 2:
            str = @"南昌";
            break;
        case 3:
            str = @"长沙";
            break;
        case 4:
            str = @"南宁";
            break;
        case 5:
            str = @"昆明";
            break;
        default:
            break;
    }
    if ([self.delegate respondsToSelector:@selector(selectCity:)]) {
        [self.delegate selectCity:str];
    }
    
    
}



@end
